﻿using System.Collections.Generic;
using BLL.Services.Books;

namespace Web.Models
{
    public class AuthorBooksListModel
    {
        public AuthorBooksListModel()
        {
            AuthorsBooks = new List<AuthorBookModel>();
        }

        public IEnumerable<AuthorBookModel> AuthorsBooks { get; set; }

        public class AuthorBookModel
        {
            public AuthorBookModel(Book book)
            {
                Id = book.BookId;
                Name = book.Name;
                Avatar = book.Avatar;
                ShortDescription = book.ShortContent;
                FileName = book.FileName;
            }

            public int Id { get; set; }

            public string Name { get; set; }

            public string Avatar { get; set; }

            public string ShortDescription { get; set; }

            public string FileName { get; set; }
        }
    }
}